package com.itms.enums;

public enum LocType {
    C("中转点","C"), D("卸货点","D"),LCM("提空箱点","LCM"), P("提货点","P"),DCM("卸空箱点","DCM"), JS("经销商","JS");
    private String name;
    private String type;
    private LocType(String name, String index) {
        this.name = name;
        this.type = type;
    }

    public static String getTypeFromName(String name){

        switch (name) {
            case "中转点":
                return  "C";
            case "卸货点":
                return  "D";
            case "提空箱点":
                return  "LCM";
            case "提货点":
                return  "P";
            case "卸空箱点":
                return  "DCM";
            case "经销商":
                return  "JS";
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
